package com.site.dao;

import com.site.pojo.CableSize;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * FileName: CableSizeDao.java
 * 电缆规格表Dao
 *
 * @author 田尚忠
 * @Date    2021/11/28
 * @version 1.00
 */
public interface CableSizeDao {
    /*查询方法*/
        //查询全部
        List<CableSize> selectAll() throws SQLException;

        //按照id查询
        CableSize selectByid(int id) throws SQLException;

        //通过信息查询
        CableSize selectByinfo(CableSize cableSize) throws SQLException;

        //通过商品id查询
        List<CableSize> selectByGoodsid(int id) throws SQLException;


    /*增加方法*/

        //新增电缆规格
        int addCableSize(Connection conn,CableSize cableSize) throws SQLException;
        int addCableSize(CableSize cableSize) throws SQLException;


    /*删除方法*/

        //通过id删除CableSize
        int delCableSizeByid(int id) throws SQLException;
        int delCableSizeByid(Connection conn, int id) throws SQLException;


        //通过商品id删除CableSize
        int delCableSizeByGoodsid(int id) throws SQLException;
        int delCableSizeByGoodsid(Connection conn, int id) throws SQLException;

    /*修改方法*/

        //通过id修改CableSize
        int updateCableSize(int id,CableSize cableSize) throws SQLException;
        int updateCableSize(Connection conn,int id,CableSize cableSize) throws SQLException;
}
